<div class="box box_margin">
          <div class="chitiet_box_title" style="width:302px;">&nbsp;&nbsp;&nbsp;<?=t(6)?></div>
   		  <div class="clear"></div>
          <div class="vietnam_content_right chitiet_categore_bg" align="center"> 
<?
$contentType = $this->viewParams['content_type'];
if(isset($this->viewParams['content_id']))
	$contentId = $this->viewParams['content_id'];
else
	$contentId = null;
?>
<?if (!empty($this->viewParams['id'])) :?>
<link href="/public/themes/hard/css/gallery2.css" type="text/css" rel="stylesheet">

          <div class="topArticle" >


            <ul class="bd" >
            <?
            	$i = 0;
            	foreach ($this->viewParams['images'] as $k => $imageItem) :?>
            <? 
            	if ($i > 4)
            		break;
            	if ($contentType == "place" || $contentType == "event")
	            	$link = $this->hvnUrl(array("module" => $contentType, "action" => "view"), "nocontroller") . "?id=" . $contentId;
    			else
					$link = $this->hvnUrl(array("type" => $contentType, "action" => "view"), "node") . "?id=" . $contentId;    				        
            	$image = str_replace("/original/", "/medium/", $imageItem['filename']);
            	$thumb = str_replace("/original/", "/xsmall/", $imageItem['filename']);
            	$title = $imageItem['title'];
            	$desc = "";
            ?>
            <?if ($k == 0) :?> 
        	<li id="gallery_<?=$k?>" class="tabcontent" style="display: block;">
        	<?else :?>
        	<li id="gallery_<?=$k?>" class="tabcontent" style="display: none;" >
        	<?endif?>
        	<a href="<?=$link?>">
        	<img src="<?=$image ?>" align="left" border="0" vspace="0" width="420" hspace="0">
        	</a>
        	<a href="<?=$link?>" class="des">
        	<p class="tit"><?=$title ?></p>
            <p><?=$desc?></p></a><a class="mask"></a>
            </li>
			<?endforeach ?>
            </ul>

    		<div style="clear:both"></div> 
            
            <ul class="hd" id="article_Nav">
            <?
            	$i = 0;
            	foreach ($this->viewParams['images'] as $k => $imageItem) :?>
            <? 
            	$i++;
            	if ($i >= 4)
            		break;
//            	if ($contentType == "place" || $contentType == "event")
//	            	$link = $this->hvnUrl(array("module" => $contentType, "action" => "view"), "nocontroller") . "?id=" . $contentId;
//    			else
//					$link = $this->hvnUrl(array("type" => $contentType, "action" => "view"), "node") . "?id=" . $contentId;    				        
            		
            	$image = str_replace("/original/", "/medium/", $imageItem['filename']);
            	$thumb = str_replace("/original/", "/xsmall/", $imageItem['filename']);
            	$title = $imageItem['title'];
            	$desc = "";
            ?>
        	<?if ($k == 0) :?> 
            <li><a class="current" href="javascript:void();" rel="gallery_<?=$k?>" title="<?$title?>">
            <?elseif ($k <= 4) :?> 
            <li><a class="" href="javascript:void();" rel="gallery_<?=$k?>" title="<?$title ?>" >
            <?else :?>
            <li ><a class="" href="<?=$image ?>" rel="gallery_<?=$k?>" title="<?$title ?>" > 
			<?endif?>
            <img src="<?=$thumb?>" align="left" border="0" vspace="5" width="50" height="50" hspace="5">
            </a></li>
            <?endforeach ?>
            </ul> 
			<a target="_blank" href="<?=$this->hvnUrl(array('module' => 'gallery', 'action' => 'view'), 'nocontroller')?>?id=<?=$this->viewParams['id']?>" ><?=t(151)?></a>
		<div> 
<?else :?>
<?=t(5004)?>. <?=t(5005)?>
<?  if (in_array($contentType, array("place", "event", "news", "blog", "promotion", "pm"))) 
		$addGalleryLink = $this->hvnUrl(array("module" => $contentType, "action" => "gallery"), "nocontroller") . "?id=" . $contentId;
	else
		$addGalleryLink = "#"; 
?>
<a href="<?=$addGalleryLink?>"> <?=t(95)?> </a>
   
<?endif ?>
</div>
</div>